﻿using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;

namespace personalplaner.common.mvvm.commands
{
    public static class EventControlBehaviours
    {
        public static readonly DependencyProperty DoubleClickCommand = EventBehaviourFactory.CreateCommandExecutionEventBehaviour(
            Control.MouseDoubleClickEvent, 
            "DoubleClickCommand", 
            typeof (EventControlBehaviours));

        public static void SetDoubleClickCommand(Control o, ICommand command)
        {
            o.SetValue(DoubleClickCommand, command);
        }

        public static void GetDoubleClickCommand(Control o)
        {
            o.GetValue(DoubleClickCommand);
        }
    }
}
